import { BaseResponse } from '@/services/family/api';
import { request } from '@umijs/max';

// export const BASE_PATH = 'http://127.0.0.1:8080';
// export const BASE_PATH = 'https://ai-familycounselor.rxqin.com:8080';
export const BASE_PATH = "https://afc.prd.rxqin.com";

export interface GenerateReportParams {
  endTime: string;
  familyId: number;
  startTime: string;
  reportPrompt?: string;
}

export const generateReport = (params: GenerateReportParams): Promise<BaseResponse<boolean>> => {
  return request(`${BASE_PATH}/AIFamilyConsultant/admin/generateReport`, {
    method: 'POST',
    data: params,
  });
};
